<template>
  <div>
    <label class="notes"
      ><span class="name">{{ this.fieldName }}</span>
      <input
        :value="value"
        @input="onChangeValue"
        type="text"
        :placeholder="this.placeholder"
      />
    </label>
  </div>
</template>

<script lang="ts">
import Vue from "vue";
import { Component,Watch,Prop } from "vue-property-decorator";

@Component
export default class Tags extends Vue {
 @Prop({default:" "}) readonly value!:string;
 @Prop({required:true}) fieldName!:string
 @Prop() placeholder?:string

 onChangeValue(event:Event) {
     this.$emit('update:value',(event.target as HTMLInputElement).value)
  }
}
</script>

<style lang="scss" scoped>
@import "~@/assets/styles/helper.scss";
.notes {
  font-size: 14px;
  padding-left: 16px;
  display: flex;
  align-items: center;
  // background-color: white;
  .name {
    padding-right: 16px;
  }
  input {
    height: 64px;
    flex-grow: 1;
    background: transparent;
    border: none;
    padding-right: 15px;
  }
}
</style>
